using System;
using System.Collections.Generic;

namespace Samurai.Workflow
{
    public interface ISequentialWorkflow<T> : IWorkflow<T> where T : class, IWorkflowContext
    {
        /// <summary>
        /// Gets the steps that make up the current workflow instance.
        /// </summary>
        /// <value>The workflow steps.</value>
        IEnumerable<IWorkflowStep<T>> WorkflowSteps { get; }

        /// <summary>
        /// Registers the provided step with the workflow.
        /// </summary>
        /// <param name="step">The step.</param>
        void RegisterStep(IWorkflowStep<T> step);

        /// <summary>
        /// Registers the provided step with the workflow on the specified thread in which to execute.
        /// </summary>
        /// <param name="step">The step.</param>
        /// <param name="thread">The thread.</param>
        void RegisterStep(IWorkflowStep<T> step, ThreadType thread);

        /// <summary>
        /// Registers the provided action as a step in the workflow to be executed on the current thread.
        /// </summary>
        /// <param name="step">The step.</param>
        void RegisterStep(Action<T> step);

        /// <summary>
        /// Registers the provided action as a step in the workflow on the specified thread in which to execute.
        /// </summary>
        /// <param name="step">The step.</param>
        /// <param name="thread">The thread.</param>
        void RegisterStep(Action<T> step, ThreadType thread);

        /// <summary>
        /// Registers the provided action as a step in the workflow to be executed on the current thread.
        /// </summary>
        /// <param name="step">The step.</param>
        void RegisterStep(Action step);

        /// <summary>
        /// Registers the provided action as a step in the workflow on the specified thread in which to execute.
        /// </summary>
        /// <param name="step">The step.</param>
        /// <param name="thread">The thread.</param>
        void RegisterStep(Action step, ThreadType thread);
    }
}